﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using java.net;
using de.l3s.boilerpipe.extractors;

namespace HodhodNews.Extraction
{
    public class BoilerpipeNewsExtractionProvider : NewsExtractionProvider
    {
        public override ExtractedNews Extract(ExtracationOptions options)
        {
            URL url = new URL(options.NewsUrl);

            string article = ArticleExtractor.INSTANCE.getText(url);

            return new ExtractedNews()
            {
                Text = article,
                Language = Language.Arabic
            };
        }
    }
}
